/************************************************************************
 * The code is owned by mainframer.cn and Shang Tao
 * Without aproval of mainframer.cn and Shang Tao, removing the copyright
 * infomation is regarded as invassion of proprietary copyright
 ***********************************************************************/
package com.mr.qa.form;

import java.util.Collection;
import java.util.Date;

import org.apache.struts.upload.FormFile;

public class AnswerForm extends BaseForm {
	private String id;
	private String content;
	private String reference;
	private FormFile file;
	private String questionId;
	private String state;
	private Boolean poll;
	private String userId;
	private boolean anonymous;
	private Integer pollCount;
	private Date date;
	private Collection comments;
        
	public boolean getAnonymous() {
		return anonymous;
	}
	public void setAnonymous(boolean anonymous) {
		this.anonymous = anonymous;
	}
	public Collection getComments() {
		return comments;
	}
	public void setComments(Collection comments) {
		this.comments = comments;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public FormFile getFile() {
		return file;
	}
	public void setFile(FormFile file) {
		this.file = file;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public Boolean getPoll() {
		return poll;
	}
	public void setPoll(Boolean poll) {
		this.poll = poll;
	}
	public Integer getPollCount() {
		return pollCount;
	}
	public void setPollCount(Integer pollCount) {
		this.pollCount = pollCount;
	}
	public String getQuestionId() {
		return questionId;
	}
	public void setQuestionId(String questionId) {
		this.questionId = questionId;
	}
	public String getReference() {
		return reference;
	}
	public void setReference(String reference) {
                if(reference == null)
                    this.reference = "";
                else if("http://".equals(reference.toLowerCase()))
                {
                    this.reference = "";
                }    
                else                    
                    this.reference = reference;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
}
